-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Development
: Add check for REST endpoints to be in kebab case
#9210
base: develop
Are you sure you want to change the base?
Development
: Add check for REST endpoints to be in kebab case
#9210
Conversation
src/test/java/de/tum/in/www1/artemis/architecture/ArchitectureTest.java
Outdated
Show resolved
Hide resolved
Development
: Architecture test for checking if REST calls use kebab caseDevelopment
: Add check if REST endpoints use kebab case
WalkthroughThe recent changes involve standardizing REST API endpoint URLs by replacing camelCase with hyphenated formats across various resources. This adjustment enhances clarity and consistency while ensuring that existing functionalities remain unchanged. The updates affect multiple classes and services, streamlining the API structure and updating documentation accordingly. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant API
participant Service
Client->>API: GET /template-scripts/{language}/{projectType}
API->>Service: Route request to getAeolusTemplateScript
Service-->>API: Return template script
API-->>Client: Send template script response
sequenceDiagram
participant Client
participant API
participant Service
Client->>API: PUT /courses/{courseId}/online-course-configuration
API->>Service: Update course configuration
Service-->>API: Acknowledge update
API-->>Client: Confirmation response
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
Tip Early access features: enabledWe are currently testing new code review model(s) that may lead to higher noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience. Note:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 9
src/main/webapp/app/exercises/programming/shared/service/aeolus.service.ts
Show resolved
Hide resolved
src/main/java/de/tum/in/www1/artemis/web/rest/ExamResource.java
Outdated
Show resolved
Hide resolved
src/test/java/de/tum/in/www1/artemis/course/CourseTestService.java
Outdated
Show resolved
Hide resolved
src/test/java/de/tum/in/www1/artemis/architecture/ResourceArchitectureTest.java
Outdated
Show resolved
Hide resolved
Development
: Add check if REST endpoints use kebab caseDevelopment
: Add check for REST endpoints to kebab case
src/test/java/de/tum/in/www1/artemis/architecture/ResourceArchitectureTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reapprove code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
does it make sense to add a test for the client side as well? or maybe something that gives at least a compiler warning when using an URL in a httpclient method that is not in kebab case
Might be useful, but I'm not sure on how that would be achieved, and I'm also not sure if it would be worth the effort. Especially because this test here, will not allow any corresponding endpoints at the server, so the client couldn't really use such an endpoint anyway. |
Development
: Add check for REST endpoints to kebab caseDevelopment
: Add check for REST endpoints to be in kebab case
src/test/java/de/tum/cit/aet/artemis/architecture/ResourceArchitectureTest.java
Outdated
Show resolved
Hide resolved
4851d33
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick change. Code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reapprove code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code
Checklist
General
Server
Client
Motivation and Context
The Artemis documentation states that REST endpoints should be written in kebab case: documentation
Description
This PR adds a test in the
ResourceArchitecureTest.java
, to check if all REST endpoints use kebab-case (and not camel case e.g.), and fixes the endpoints which are not defined correctly.Steps for Testing
In theory functionality wise nothing should have changed, as only some endpoint URLs were refactored/renamed.
You can check if features related to the following refactored endpoints still work correctly:
Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.
Review Progress
Code Review
Manual Tests
Test Coverage
Screenshots
Summary by CodeRabbit
Summary by CodeRabbit
New Features
templateScripts
totemplate-scripts
onlineCourseConfiguration
toonline-course-configuration
lockedSubmissions
tolocked-submissions
exerciseGroups
toexercise-groups
cleanupBuildPlan
tocleanup-build-plan
buildArtifact
tobuild-artifact
Bug Fixes
Documentation